package com.joymart.order.model;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;
import org.json.JSONObject;
import org.springframework.data.annotation.Id;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Data
public class OrderEvent {

    @Id
    private String id;
    private String orderId;
    private String eventType;
    private String userId;
    // 金额，不同事件代表不同含义
    private BigDecimal amount;
    @JsonSerialize
    private JSONObject meta;

    private LocalDateTime createdAt;
}
